//
//  JBBasicDataListViewModuleController.h
//  DataViewModuleController
//
//  Created by Yongbin Zhang on 12/30/13.
//  Copyright (c) 2013 JustBen. All rights reserved.
//

#import "JBBasicDataViewModuleController.h"

@interface JBBasicDataListViewModuleController : JBBasicDataViewModuleController


@property (nonatomic, retain) NSMutableArray *dataList;

//  上一次加载的最后一个数据的位置（这里的lastPos可能是指分页的页码，也可能是说最后一条数据的pos）＊一页可包含多条数据
@property (nonatomic, copy) NSString *lastPos;
//  每一次加载的数据量
@property (nonatomic, assign) NSInteger loadCount;



//  模版方法
//  重新加载数据
- (void)reloadData;
- (void)reloadDataWithSuccess:(void (^)())success failure:(void (^)(NSInteger errorCode, NSString *errorMsg))failure;
- (void)reloadDataSuccessedWithLastPos:(NSString *)lastPos dataList:(NSArray *)dataList;
- (void)reloadDataFailed;

//  模版方法
//  加载更多的数据
- (void)loadMoreData;
- (void)loadMoreDataWithSuccess:(void (^)())success failure:(void (^)(NSInteger errorCode, NSString *errorMsg))failure;
- (void)loadMoreDataSuccessedWithLastPos:(NSString *)lastPos dataList:(NSArray *)dataList;
- (void)loadMoreDataFailed;

@end
